package base_config

type RedisClusterConfig struct {
	Addrs          []string `mapstructure:"addrs" yaml:"addrs"`
	Username       string   `mapstructure:"username" yaml:"username"`
	Password       string   `mapstructure:"password" yaml:"password"`
	PoolSize       int      `mapstructure:"poolSize" yaml:"poolSize"`
	ReadOnly       bool     `mapstructure:"readOnly" yaml:"readOnly"`
	RouteByLatency bool     `mapstructure:"routeByLatency" yaml:"routeByLatency"`
	RouteRandomly  bool     `mapstructure:"routeRandomly" yaml:"routeRandomly"`
	DialTimeout    int      `mapstructure:"dialTimeout" yaml:"dialTimeout"`
	ReadTimeout    int      `mapstructure:"readTimeout" yaml:"readTimeout"`
	WriteTimeout   int      `mapstructure:"writeTimeout" yaml:"writeTimeout"`
}

type RedisConfig struct {
	Mode    string             `mapstructure:"mode" yaml:"mode"`
	Cluster RedisClusterConfig `mapstructure:"cluster" yaml:"cluster"`
}

type RedisYaml struct {
	Redis RedisConfig `mapstructure:"redis" yaml:"redis"`
}
